<template>
    <div>
        <el-table :data="bureausList" style="width: auto">
            <el-table-column fixed prop="bureauCity" label="社保局" width="auto" />
            <el-table-column prop="bureauAddress" label="社保局地址" width="auto" />
            
            <!-- <el-table-column fixed="right" label="操作" width="150">
              <template #default>
                <el-button link type="primary" size="small" @click="handleClick"
                  >缴纳</el-button
                >
           
             </template>
            </el-table-column> -->
        </el-table>
    </div>
  </template>
  
  <script setup>
  import myAxios from "../../plugins/myAxios.js"
  import { onMounted } from 'vue';
  import { ref } from 'vue';
  
  
  //公司列表
  const bureausList = ref([]);
  
  const handleClick = () => {
  console.log('click')
  }
  
  const query = () => {
  console.log(localStorage.getItem('senderAddress'))
  myAxios.post("/query/searchBureaus", {userAddress: localStorage.getItem('senderAddress')})
  .then((res) => {
    if (res.data.code === 200) {
      bureausList.value = res.data.data;
      // cookies.set('companyList', JSON.stringify(companyList.value))
    } else {
      alert(`请求失败：${res.data.msg}`);
    }
  })
  .catch((error) => {
      alert(`请求失败：${error}`);
    });
  }
  
  onMounted(() => {
  query()
  })
  </script>
  